export default {
  methods: {
    saveParams(payload) {
      this.$router.replace({query: {...this.payload, ...payload}})
    },
    // 保存列表参数
    mixinFetchList() {
      if (typeof this.fetchList === 'function') {
        this.fetchList()
      }
    }
  },
  created() {
    window.addEventListener('popstate', this.mixinFetchList)
  },
  beforeDestroy() {
    window.removeEventListener('popstate', this.mixinFetchList)
  }
}
